package com.handinfo.android.core.ui;

import android.content.Context;
import android.graphics.Color;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.Toast;

public class DWToast extends Toast
{
	TextView text;
	Context con;

	public DWToast(Context context)
	{
		super(context);
		con = context;
		text = new TextView(con);
		text.setTextColor(Color.WHITE);
		LinearLayout linLay = new LinearLayout(con);
		
		int id = context.getResources().getIdentifier("toast", "raw", context.getPackageName());
		
		linLay.setBackgroundDrawable(context.getResources().getDrawable(id));
		linLay.setPadding(5, 5, 5, 5);
//		linLay.setBackgroundResource(R.raw.toast);
		linLay.addView(text);
		setView(linLay);
	}

	public void setText(CharSequence s)
	{
		text.setText(s);
	}
	
	

	public void setView(View view)
	{
		super.setView(view);
	}
}
